home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dirut
/
retain20.zip
/
RETAINCD.BAT
< prev
Wrap
DOS Batch File
|
1992-12-11
|
2KB
|
41 lines
echo off
rem ===RETAINCD.BAT, vs. 2.0, 11/12-92===
echo --- RETAINCD 2.0 (c) 1992, Jim Groeneveld; RETAIN & CD combo.
rem (1) retains the current drive:subdir and
rem (2) changes drive and subdir to the first parameter
if "%1"=="" goto help
if "%1"=="?" goto help
if "%1"=="/?" goto help
if "%1"=="-?" goto help
:CDD
call retain %2 %3
rem command/c retain ; for DOS«3.3 (or use external CALL.COM program by me)
rem Check for existence of [drive:][path] could be included here, but isn't.
rem To suppress DOS error messages if the parameter contains no drive, but
rem only a subdirectory specification: CTTY NUL .
ctty nul
%1\
rem No check for existence of drive.
ctty con
cd %1
rem Invalid directories are reported by DOS and do not need to be analyzed here
goto end
:help
echo.
echo Syntax: 'RETAINCD drive┼path [aux-path[aux-file]│*│[/│-]?│+ [rtn-spec]]',
echo from the directory to retain, in which:
echo drive = drive specification to CD to, e.g. 'C:';
echo path = absolute (\[...[\...]]) or
echo relative (...[\...]) path specification to CD to.
echo At least one of these (either drive or path) or both _must_ be specified.
echo aux-path = drive:\subdir\ of auxiliary file $RETURN$.AUX, incl. trailing '\';
echo aux-file = the eventual alternate auxiliary file name for $RETURN$.AUX;
echo * = list the currently stored paths;
echo ? (or /? or -?) = display this help;
echo + = dummy second argument if additional third one specified;
echo rtn-spec = (full drive, path and) file specification of the RETURN-file,
echo without '.BAT' extension, default C:\RETURN.
:end